import java.util.ArrayList;
import java.util.Collections;

public class PokerGame {
    public static void main(String[] args) {
        String[] colors = new String[]{"方块", "黑桃", "梅花", "红桃"};
        String[] numbers = new String[]{"A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"};
        ArrayList Tom = new ArrayList();
        ArrayList Jack = new ArrayList();
        ArrayList Me = new ArrayList();
        ArrayList last = new ArrayList();
        ArrayList pokers = new ArrayList();

        for (int i = 0; i < colors.length; i++) {
            for (int j = 0; j < numbers.length; j++) {
                pokers.add(colors[i] + " " + numbers[j]);
            }
        }
        pokers.add("大王");
        pokers.add("小王");
        Collections.shuffle(pokers);
        for (int i = 0; i < pokers.size(); i++) {
            if (i < pokers.size() - 3) {
                if (i % 3 == 0) {
                    Tom.add(pokers.get(i));
                } else if (i % 3 == 1) {
                    Jack.add(pokers.get(i));
                } else if (i % 3 == 2) {
                    Me.add(pokers.get(i));
                }
            } else {
                last.add(pokers.get(i));
            }
        }

        System.out.println("Tom的牌" + Tom.size());
        System.out.println(Tom);
        System.out.println("Jack的牌" + Jack.size());
        System.out.println(Jack);
        System.out.println("Me的牌" + Me.size());
        System.out.println(Me);
        System.out.println("底牌"+last.size());
        System.out.println(last);
    }
}
